package com.banciyuan.wallpaper.event;

import java.util.HashMap;
import java.util.Map;

import rx.Observable;

/**
 * Created by squall on 2016/7/7.
 */
public class RxProvider {

    private static Map<Integer, RxWatcher> rxPool = new HashMap<>();

    public static void putWatcher(Integer name, RxWatcher rxWatcher) {
        rxPool.put(name, rxWatcher);
    }

    public static void removeWatchher(Integer name) {
        rxPool.remove(name);
    }

    public static void report(Integer code, Observable observable) {
        rxPool.get(code).go(code, observable);
    }
}
